package com.company.cloud.user.modules.api.service;

import com.company.cloud.common.bean.BaseClientResult;
import com.company.cloud.user.modules.api.fallback.UserDataRemoteServiceFallbackFactory;
import com.company.cloud.user.modules.api.request.RegisterNumDataRequest;
import com.company.cloud.user.modules.api.response.RegisterNumDataResponse;
import com.company.common.server.constant.ServiceNameConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;
import java.util.Set;

@FeignClient(contextId = "user3", name = ServiceNameConstant.user_center, fallbackFactory = UserDataRemoteServiceFallbackFactory.class)
public interface UserDataRemoteService {

	@RequestMapping(value = "/remote/user/registerUserNum", method = RequestMethod.POST)
	public BaseClientResult<RegisterNumDataResponse> registerUserNum(@RequestBody RegisterNumDataRequest params);

	@RequestMapping(value = "/remote/user/customerCount", method = RequestMethod.GET)
	public BaseClientResult<Map<Integer,Integer>> customerCount(@RequestParam("userId") Integer userId);

	@RequestMapping(value = "/remote/user/customerCountMap", method = RequestMethod.POST)
	public BaseClientResult<Map<Integer,Integer>> customerCountMap(@RequestBody Set<Integer> userId);


	@RequestMapping(value = "/remote/user/wjjTest", method = RequestMethod.GET)
	public BaseClientResult<String> wjjTest(@RequestParam("code") String code);


}
